const { processDirectory } = require('./fileProcessor');

async function generateCodeSnapshot(dirPath, options = {}) {
  try {
    if (!dirPath) {
      throw new Error('必须提供目录路径');
    }
    
    return await processDirectory(dirPath, options);
  } catch (error) {
    throw new Error(`生成代码快照失败: ${error.message}`);
  }
}

module.exports = generateCodeSnapshot;